/*
 * @Author: Salaing
 * @Date: 2024-06-30 21:26:35
 * @LastEditors: Salaing
 */
import ajax from '../http';

// 获取员工列表
export const getStaffList = (params) => ajax.post('/getStaff', params);

// 获取员工详情
// export const getStaffDetail = (params) => ajax.get(`/getStaffDetail`, params); 错误
//- 获取员工详情
export const getStaffDetail = ({ _id }) => ajax.get(`/staffDetail/${_id}`);

// 新增员工=员工注册
export const createStaff = (params) => ajax.post('/createStaff', params);

// 修改员工信息
export const updateStaff = (params) => ajax.put('/updateStaff', params);

// 删除员工
export const deleteStaffs = (params) => ajax.post('/destroyStaff', params);

// 检测员工手机号或者用户名是否已经存在
export const checkIsExists = (params) => ajax.post('/checkIsExists', params);

// 文件上传Token获取、
export const getUploadToken = (params) => ajax.get('/getUploadToken', params);

// 删除图片
export const deleteFile = (params) => ajax.post('/deleteFile', params);


